{template "topic_header"}
<div class="appframe">  
<div class="appframeTitle"><span class="mleft">附件</span></div>
<script type="text/javascript">
function delete_attach(id){var id = ('undefined'==typeof(id) ? 0 : id);var del = confirm("您确定要删除这个文件吗？");if(del == true && id > 0){$.post('ajax.php?mod=uploadattach&code=delete_attach',{'id':id},function (r){if(r.done){$('#attach_' + id).remove();}else{if(r.msg){MessageBox('warning', r.msg);}}},'json');}}
function modify_attach(id){var id = ('undefined'==typeof(id) ? 0 : id);var handle_key = 'mod_attach_win';var ajax_url = "ajax.php?mod=uploadattach&code=modify";showDialog(handle_key, 'ajax', "编辑", {"url":ajax_url, "post":{id:id}}, 420);}
</script>
<div class="appframeWrap">
<h3>近期热门下载</h3>
<ul class="attachul">
<!--{loop $hot_down_list $val}-->
<li> <a href="index.php?mod=topic&code={$val[tid]}" title="下载次数：{$val[download]}" target="_blank">{$val[id]}、{$val[name]}</a> </li>
<!--{/loop}-->
</ul>
</div>

<div class="appframeWrap">
	<div class="boxNav3" style="width:auto; background:#f2f2f2; border-bottom:1px solid #ddd;">
    <li>
	<span class="{$current_new}"><a href="index.php?mod=attach&code=new">最新附件 </a></span>
	<!--{if MEMBER_ID > 0}-->
	<!--{eval if('myattach'== $_GET['code']) $current_my = 'current'}-->
	<!--{eval if('myfollowattach'== $_GET['code']) $current_myf = 'current2'}-->
	<span class="{$current_my}"><a href="index.php?mod=attach&code=myattach">我的附件 </a></span>
	<span class="{$current_myf}"><a href="index.php?mod=attach&code=myfollowattach">我关注人的附件</a></span>
	<!--{/if}-->
	</li>
    </div>
	<style type="text/css">
	.n_attach{margin:10px 0 0 0;}
	.n_attach li{border-bottom:1px dotted #ddd;margin:15px 0;height:65px;}
	.n_attach li img{float:left;margin-right:15px;display:inline;border:none;width:32px;height:32px;}
	.n_attach li .attach_info{display:inline;text-align:left;float:left;overflow:hidden;width:850px;}
	.n_attach li .attach_info p{ float:left; display:block; width:850px;margin-bottom: 5px;}
	.n_attach li .attach_info p b{margin-right:10px;}
	</style>
	<ul class="n_attach">
	<!--{if $attach_list}-->
	<!--{loop $attach_list $vl}-->
	<li id="attach_{$vl[id]}">
    <img src="{$vl[img]}" class="attach_img_{$vl[id]}">
    <div class="attach_info">
    <p><span class="mleft">
    <b class="attach_name_{$vl[id]}">{$vl[name]}</b>(大小：<i class="attach_size_{$vl[id]}">{$vl[filesize]}</i>)</span>
    <span class="mright">上传者：<a href="index.php?mod={$vl[uid]}" onmouseover="get_at_user_choose('{$vl[username]}',this)">{$vl[username]}</a> | 上传时间：{$vl[dateline]}</span>
    </p>
    <p>
    <span class="mleft"><!--{if $vl[manage]}--><a href="javascript:void(0);" onclick="modify_attach({$vl[id]});return false;">编辑</a> | <a href="javascript:void(0);" onclick="delete_attach({$vl[id]});return false;">删除</a> | <!--{/if}--><a target="_blank" href="index.php?mod=topic&code={$vl[tid]}">讨论</a></span>
    <span class="mright">
    <a href="javascript:void(0);"  onclick="downattach({$vl[id]});">点此下载</a> (需 <font id="attach_score_{$vl[id]}">{$vl[score]}</font> 积分 | 已下载：<font id="attach_downnum_{$vl[id]}">{$vl[download]}</font>次)
    </span></p>
    </div>
    </li>
	<!--{/loop}-->
	<!--{if $page_arr[html]}--><div class="pageStyle"><li>{$page_arr[html]}</li></div><!--{/if}-->
	<!--{else}-->
	<center>还没有上传任何附件</center>
	<!--{/if}-->
    </ul>
</div>
</div>

{template "topic_footer"}